﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mui="http://firstfloorsoftware.com/ModernUI"
    xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"
    xmlns:ui="clr-namespace:SeismicResponseSpectrum.Ui"
    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
    x:Name="userControl"
    x:Class="SeismicResponseSpectrum.Ui.MainPage"
    mc:Ignorable="d"

    d:DesignHeight="525" d:DesignWidth="697">
    <UserControl.Resources>
        <DataTemplate x:Key="RecordTemplate">
            <ui:SeismicRecordControl />

        </DataTemplate>
        <Style x:Key="GridSplitterPreviewStyle">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle Fill="#80000000" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="GridSplitterStyle1" TargetType="{x:Type GridSplitter}">
            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
            <Setter Property="PreviewStyle" Value="{StaticResource GridSplitterPreviewStyle}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type GridSplitter}">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition Width="1" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Border BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{TemplateBinding Background}" Grid.ColumnSpan="3" />
                            <Border x:Name="dash_line" Grid.Column="1" HorizontalAlignment="Stretch" Height="Auto"
                                    VerticalAlignment="Stretch" BorderThickness="1,0,0,0">
                                <Border.BorderBrush>
                                    <DrawingBrush Viewport="0,0,8,8" ViewportUnits="Absolute" TileMode="Tile">
                                        <DrawingBrush.Drawing>
                                            <DrawingGroup>
                                                <GeometryDrawing Brush="Gray">
                                                    <GeometryDrawing.Geometry>
                                                        <GeometryGroup>
                                                            <RectangleGeometry Rect="0,0,50,50" />
                                                            <RectangleGeometry Rect="50,50,50,50" />
                                                        </GeometryGroup>
                                                    </GeometryDrawing.Geometry>
                                                </GeometryDrawing>
                                            </DrawingGroup>
                                        </DrawingBrush.Drawing>
                                    </DrawingBrush>
                                </Border.BorderBrush>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid>
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition Width="1*"/>
			<ColumnDefinition Width="15"/>
    		<ColumnDefinition Width="200"/>
    	</Grid.ColumnDefinitions>



        <mui:ModernTab SelectedSource="ThreeCharts.xaml" Layout="Tab">
            <mui:ModernTab.Links>
                <mui:Link DisplayName="Tripartite Spectrum" Source="TripartiteSpectrum.xaml"/>
                <mui:Link DisplayName="Spectrums" Source="ThreeCharts.xaml"/>
                
            </mui:ModernTab.Links>
        </mui:ModernTab>
        
        
		<Grid x:Name="LayerControlGrid" Margin="5,0,0,0" Grid.Column="2">
			<Grid.RowDefinitions>
				<RowDefinition Height="35" />
				<RowDefinition Height="448*" />
			</Grid.RowDefinitions>
			<ItemsControl Name="LayersItemsControl" ItemTemplate="{DynamicResource RecordTemplate}" Margin="5" Grid.RowSpan="2" Grid.Row="1"
				ItemsSource="{Binding Records, ElementName=userControl}" />
			<Button x:Name="btnAddRecord" Content="Add Record" Margin="5" Click="btnImport_Click" />

		</Grid>
		<GridSplitter HorizontalAlignment="Stretch" Background="#02F0F0F0"
			Style="{DynamicResource GridSplitterStyle1}" Grid.Column="1" />
	</Grid>
</UserControl>